//
//  RootTableViewCell.m
//  WangI
//
//  Created by dllo on 15/11/24.
//  Copyright © 2015年 WJN. All rights reserved.
//

#import "RootTableViewCell.h"

@implementation RootTableViewCell

- (void)awakeFromNib {
    // Initialization code
}

- (void)setSelected:(BOOL)selected animated:(BOOL)animated {
    [super setSelected:selected animated:animated];

    // Configure the view for the selected state
}
-(instancetype)initWithStyle:(UITableViewCellStyle)style reuseIdentifier:(NSString *)reuseIdentifier{
    self=[super initWithStyle:style reuseIdentifier:reuseIdentifier];
    [self addSubview:self.view];
//    self.backgroundColor=[UIColor yellowColor];
    [self addSubview:self.labelZ];
    [self addSubview:self.labelT];
    [self addSubview:self.imageViewtu];
    
    return self;
}

-(void)layoutSubviews{
    [super layoutSubviews];
    self.imageViewtu.frame=CGRectMake(15, 15, (self.bounds.size.width-45)/5*2, self.bounds.size.height-30);
    self.imageViewtu.backgroundColor=[UIColor cyanColor];
    
    self.labelT.frame=CGRectMake(30+_imageViewtu.bounds.size.width, 15, (self.bounds.size.width-45)/5*3, 40);
    self.labelT.backgroundColor=[UIColor whiteColor];
    self.labelZ.font=[UIFont systemFontOfSize:14];
    self.labelZ.numberOfLines=0;
    
    self.labelZ.frame=CGRectMake(30+_imageViewtu.bounds.size.width,70 , (self.bounds.size.width-45)/5*3,self.bounds.size.height-45-40 );
    self.labelZ.backgroundColor=[UIColor whiteColor];
    self.labelZ.font=[UIFont systemFontOfSize:14];
    self.labelZ.numberOfLines=0;
    
}

-(UIView *)view{
    if (!_view) {
        self.view=[[UIView alloc]initWithFrame:CGRectZero];
    }
    return _view;
}
-(UILabel *)labelT{
    if (!_labelT) {
        self.labelT=[[UILabel alloc]initWithFrame:CGRectZero];
    }
    return _labelT;
}
-(UILabel *)labelZ{
    if (!_labelZ) {
        self.labelZ=[[UILabel alloc]initWithFrame:CGRectZero];
    }
    return _labelZ;
}
-(UIImageView *)imageViewtu{
    if (!_imageViewtu) {
        self.imageViewtu=[[UIImageView alloc]initWithFrame:CGRectZero];
    }
    return _imageViewtu;
}

@end
